# encoding: utf-8

import wsgiref.handlers
import os
import re
import cgi
import datetime
import sys

from google.appengine.api import users
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.api import memcache

import admin
import models
import functions
import cache
#import options
import smaider

class CategoriesPage(admin.BaseRequestHandler):
    """/admin/categories - Admin page for categories."""
    @admin.requires_admin
    def get(self,comments={}):
        values = {
            'categories': models.Category.all()
        }
        values.update(comments)
        self.generate('categories.html', values)

def getplugurl():
    return {1:('r',re.compile('/admin'),smaider.MainPageHandler),0:('i',re.compile('/'),CategoriesPage)}
